package piece;

import java.awt.*;

public class Piece {
    // true represents black, false represents white.
    private final boolean isBlack;

    public static final int pieceSize = 30;

    public Piece(boolean color) {
        this.isBlack = color;
    }

    public boolean getColor() {
        return isBlack;
    }

    public void draw(Graphics g,int x, int y) {
        if (isBlack) {
            g.setColor(Color.BLACK);
        } else {
            g.setColor(Color.WHITE);
        }
        g.fillOval(x - pieceSize / 2, y - pieceSize / 2, pieceSize, pieceSize);
    }
}